<?php
include('inc_head.php');
if($wu->request_string("act")=="save"){
	$arr=array('SiteName','MetaKeyword','MetaDescription','SiteLogo','FooterInfo');
	foreach($arr as $a){
		$biz->update_generalvalue($a,$wu->request_string($a),'siteinfo');
	}
	$wu->redirect('保存成功','?success');
}
$data=array('SiteName'=>$biz->get_generalvalue('SiteName'), 'MetaKeyword'=>$biz->get_generalvalue('MetaKeyword'), 'MetaDescription'=>$biz->get_generalvalue('MetaDescription'), 'SiteLogo'=>$biz->get_generalvalue('SiteLogo'), 'FooterInfo'=>$biz->get_generalvalue('FooterInfo'), );
	
?>
<form action="#" method="post" >
<h1>编辑网站信息</h1>
<table cellpadding="0" cellspacing="0">网站名称</td><td><input type="text" name="SiteName" value="<?php echo $data['SiteName']; ?>" /></td></tr>
    <tr><td>META关键词</td><td><input type="text" name="MetaKeyword" value="<?php echo $data['MetaKeyword']; ?>" size="30" /></td></tr>
    <tr><td>META描述</td><td><textarea name="MetaDescription" cols="120" rows="6"><?php echo $data['MetaDescription']; ?></textarea></td></tr>
    <tr><td>网站LOGO</td><td><?php echo get_fileinput('SiteLogo',$data['SiteLogo']); ?></td></tr>
    <tr><td>底部版权信息</td><td><textarea name="FooterInfo" class="editor" cols="120" rows="6"><?php echo $data['FooterInfo']; ?></textarea></td></tr>
    <tr><td>
            <input type="submit" value="保存" />
            <input type="reset" class="btn" value="重置" />
            <input type="hidden" name="act" value="save" />
        </td></tr>
</fieldset>
</form>
<?php
	include('inc_foot.php');
?>